package com.indexingsystem.boss.Vo;

import java.io.Serializable;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

import org.springframework.format.annotation.DateTimeFormat;

public class PusersSelectVo implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5052330636940177504L;
	private String queryCriteria;

	private String startCreateTime;
	
	private String endCreateTime;
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date startLoginTime;
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date endLoginTime;
	private Integer queryType;
	private Integer pageNumber;
	private Integer pageSize;
	private String id;

	public String getStartCreateTime() {
		java.util.Date date;
		/*try {

			DateFormat df = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US);

			date = df.parse(startCreateTime.toString());// 那天是周一

			df = new SimpleDateFormat("yyyy-MM-dd");

			String str = df.format(date);// 获得格式化后的日期字符串
			System.err.println(str);// 打印最终结果
			return df.parse(startCreateTime.toString());
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}*/
		return startCreateTime;
	}

	public void setStartCreateTime(String startCreateTime) {
		this.startCreateTime = startCreateTime;
	}

	
	public String getEndCreateTime() {
	/*	SimpleDateFormat sdf1 = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy", Locale.ENGLISH);
		SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		if (endCreateTime != null) {
			try {
				endCreateTime = sdf2.parse(sdf1.parse(endCreateTime.toString()).toString());
			} catch (ParseException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}*/
		return endCreateTime;
	}

	public void setEndCreateTime(String endCreateTime) {
		this.endCreateTime = endCreateTime;
	}

	public Date getStartLoginTime() {
		return startLoginTime;
	}

	public void setStartLoginTime(Date startLoginTime) {
		this.startLoginTime = startLoginTime;
	}

	@DateTimeFormat(pattern = "yyyy-MM-dd")
	public Date getEndLoginTime() {
		return endLoginTime;
	}

	public void setEndLoginTime(Date endLoginTime) {
		this.endLoginTime = endLoginTime;
	}

	public Integer getQueryType() {
		return queryType;
	}

	public void setQueryType(Integer queryType) {
		this.queryType = queryType;
	}

	public Integer getPageNumber() {
		return pageNumber;
	}

	public void setPageNumber(Integer pageNumber) {
		this.pageNumber = pageNumber;
	}

	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}

	public String getQueryCriteria() {
		return queryCriteria;
	}

	public void setQueryCriteria(String queryCriteria) {
		this.queryCriteria = queryCriteria;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public PusersSelectVo() {
		super();
	}

	public PusersSelectVo(String queryCriteria, String startCreateTime, String endCreateTime, Date startLoginTime,
			Date endLoginTime, Integer queryType, Integer pageNumber, Integer pageSize, String id) {
		super();
		this.queryCriteria = queryCriteria;
		this.startCreateTime = startCreateTime;
		this.endCreateTime = endCreateTime;
		this.startLoginTime = startLoginTime;
		this.endLoginTime = endLoginTime;
		this.queryType = queryType;
		this.pageNumber = pageNumber;
		this.pageSize = pageSize;
		this.id = id;
	}

	@Override
	public String toString() {
		return "PusersSelectVo [queryCriteria=" + queryCriteria + ", startCreateTime=" + startCreateTime
				+ ", endCreateTime=" + endCreateTime + ", startLoginTime=" + startLoginTime + ", endLoginTime="
				+ endLoginTime + ", queryType=" + queryType + ", pageNumber=" + pageNumber + ", pageSize=" + pageSize
				+ ", id=" + id + "]";
	}
}